package cn.stylefeng.guns.dao.impl;

import cn.stylefeng.guns.dao.entity.RuleSupplier;
import cn.stylefeng.guns.dao.mapper.RuleSupplierMapper;
import cn.stylefeng.guns.dao.IRuleSupplierService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 服务实现类
 * </p>
 *
 * @author quspacedraon
 * @since 2024-01-13
 */
@Service
public class RuleSupplierServiceImpl extends ServiceImpl<RuleSupplierMapper, RuleSupplier> implements IRuleSupplierService {
    @Override
    public Boolean isExist(List<String> supplierIdList, String goodsId, Long startTime, Long endTime) {
        return this.baseMapper.isExist(supplierIdList, goodsId, startTime, endTime) > 0;
    }

    @Override
    public List<RuleSupplier> getAvailableList(List<String> supplierIdList, List<String> goodsIdList, Long startTime, Long endTime) {
        return this.baseMapper.getAvailableList(supplierIdList, goodsIdList, startTime, endTime);
    }
}
